package com.yanftch.hdc_tools

import com.intellij.ide.plugins.PluginManager
import com.intellij.openapi.components.ApplicationComponent
import com.intellij.openapi.extensions.PluginId
import com.yanftch.hdc_tools.common.MessageDelegate

private val pluginPackage = "com.yanftch.hdc_tools"


/**
* 数据持久化保存：https://juejin.cn/post/7309355198682169370#heading-9
*/
class Application : ApplicationComponent {



    override fun initComponent() {
        try {
            val version = PluginManager.getPlugin(PluginId.getId(pluginPackage))!!.version!!
        } catch (e: Exception) {
            MessageDelegate.error("Couldn't initialize hdc_tools: ${e.message}", null)
        }
    }
}
